package com.itheima.demoStringBuilder;

public class Demo01StringBuilder {
    public static void main(String[] args) {
        StringBuilder sb1 = new StringBuilder();
        StringBuilder sb2 = new StringBuilder();

        sb1.append("Hello");//添加数据,返回对象本身
        System.out.println("sb1: " + sb1);

        sb2.append("你真").append("是个").append("伞兵");//链式编程
        System.out.println("sb2: " + sb2);

        StringBuilder sb3 = sb1.reverse();
        System.out.println("sb1: " + sb1);
        System.out.println("sb3: " + sb3);
        System.out.println(sb1 == sb3);//true

    }
}
